#ifndef OPTIONS_H
#define OPTIONS_H

# include	<QObject>
# include	<QtWidgets/QWidget>
# include	<QtWidgets/QMenu>
# include	<QtWidgets/QPushButton>
# include	<QtWidgets/QMessageBox>
# include	<QtWidgets/QDialog>
# include	<QtWidgets/QVBoxLayout>
# include	<QtWidgets/QHBoxLayout>
# include	<QtWidgets/QSlider>
# include	<QtWidgets/QLabel>
# include	<QtWidgets/QCheckBox>
# include	<iostream>
# include	"options_global.h"
# include	"IOrder.h"
# include	"IModule.h"
# include	"BabelApi.h"

#if defined __linux__
class __attribute__((visibility ("default")))   Options : public QObject, public IModule
#else
class __declspec(dllexport)                     Options : public QObject, public IModule
#endif
{
	Q_OBJECT

public:
	Options();
	virtual ~Options();
	virtual void					takeOrder(IOrder *, Protocol);
	virtual void					test();
	virtual std::vector<Protocol>	getProtocol() const;
	virtual	void					setApi(BabelApi *);
	virtual void					init();

public slots:
	void							OnToolsButtonTriggered();
	void							OnSupportButtonTriggered();
	void							SpeakerValueChanged(int);
	void							MicrophoneValueChanged(int);
	void							SpeakerStateChanged(int);
	void							MicrophoneStateChanged(int);
	void							closeDialog();

private:
	BabelApi						*_api;
	std::vector<Protocol>			_proto;
	QMenu							*_menu;
	QAction							*_tools;
	QAction							*_support;
	QDialog							*_toolsWindow;
	QSlider							*sliderSpeaker;
	QSlider							*sliderMicrophone;
	QPushButton						*_exitButton;

private:
	void							addMenuOptions();
};

#endif // OPTIONS_H
